package JMU3.BianChen.ti3;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @author Lenovo
 */
class Rectangle{
    private int width;
    private int length;
    public Rectangle(int width,int length){
        this.width=width;
        this.length=length;
    }
    public int getPerimeter(){
        return 2*(width+length);
    }
    public int getArea(){
        return width*length;
    }

    @Override
    public String toString() {
        return "Rectangle [width=" + width + ", length=" + length + "]";
    }
}
class Circle{
    private int radius;
    public Circle(int radius){
        this.radius=radius;
    }
    public int getPerimeter(){
        return (int)Math.PI*2*radius;
    }
    public int getArea(){
        return (int)Math.PI*radius*radius;
    }

    @Override
    public String toString() {
        return "Circle [radius="+radius+"]";
    }
}
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Rectangle[] rectangles=new Rectangle[2];
        for (int i=0;i<=2;i++){
            int width= scanner.nextInt();
            int length= scanner.nextInt();
            rectangles[i]=new Rectangle(width,length);
        }
        Circle[] circles=new Circle[2];
        for (int i=0;i<=2;i++){
            int radius= scanner.nextInt();
            circles[i]=new Circle(radius);
        }
        int c=0;
        for(int i=0;i< rectangles.length;i++){
            Rectangle rectangle=rectangles[i];
            c+=rectangle.getPerimeter();
        }
        for(int i=0;i<circles.length;i++){
            Circle circle=circles[i];
            c+=circle.getPerimeter();
        }
        int s=0;
        for(int i=0;i< rectangles.length;i++){
            Rectangle rectangle=rectangles[i];
            s+=rectangle.getArea();
        }
        for(int i=0;i<circles.length;i++){
            Circle circle=circles[i];
            s+=circle.getArea();
        }
        System.out.println(c);
        System.out.println(s);
        System.out.println(Arrays.deepToString(rectangles));
        System.out.println(circles);
    }

}
